#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: dingtalk.py 
@version:
@time: 2022/02/25 
"""
from dingtalkchatbot.chatbot import DingtalkChatbot
from django.conf import settings


def send(message, at_mobiles=[]):
    """

    :param message:
    :param at_mobiles: 【电话号码】
    :return:
    """
    webhook = settings.DINGTALK_WEB_HOOK
    xiaoding = DingtalkChatbot(webhook)

    # 方式二
    # xiaoding = DingtalkChatbot(webhook, secret=secret)

    xiaoding.send_text(msg=('面试通知：%s' % message), at_mobiles=at_mobiles)
